<%= javascript_include_tag 'comment/comment.js' %>
<%= javascript_include_tag 'main/main.js' %>
<%= stylesheet_link_tag 'comment/comment.css' %>
<%= render "main/head" %>
<body class="main_background">
<div style="text-align: center">
  <div class="currency_frame">
    <% @laud_info.each_with_index do |laud_info,index| %>
        <div class="note_fram" style="color: #ffffff;">
          <div class="comment_user_info" onclick="jump_page('/main/get_user_info?user_name=<%= laud_info[1].name %>')">
            <img src="<%= laud_info[1].user_image %>">
            <span><%= laud_info[1].name %></span> 攒了
            <br>
            <span><%= laud_info[2].to_s.slice(5,11) %></span>
          </div>

          <div class="comment_note_info" onclick="jump_page('/note_info/get_note?note_id=<%= laud_info[0].id %>')">
            <img src="<%= laud_info[0].note_photo %>">
            <%= laud_info[0].user_id %>: <span><%= laud_info[0].content.length > 10 ? laud_info[0].content.slice(0,10) +'......' : laud_info[0].content %></span>
          </div>
          <div onclick="show_comment(<%= index %>)" style="margin: 10px 20px;text-align: left" class="margin-right-20">
            <%= image_tag "reply",:class => 'icon' %>
            <span >评论</span>
          </div>

          <div id="comment_input_fram<%= index %>" class="comment_input_fram">
            <textarea id="comment<%= index  %>" rows="3" ></textarea>
            <button onclick="send_comment(<%= index  %>,<%= laud_info[0].id  %>,'<%= laud_info[1].name  %>')">回复</button>
          </div>
          <br/>
        </div>
    <% end %>
  </div>
</div>
</body>
